package com.mzj.eagle;

import java.io.IOException;
import java.net.URISyntaxException;

import org.apache.log4j.Logger;

import com.mzj.eagle.thread.RedisSycThread;
import com.mzj.eagle.util.JedisUtils;

public class Application {

	private static final Logger LOG = Logger.getLogger(Application.class);

	public static void main(String[] args) throws IOException, URISyntaxException {
		String redisUrl = "redis://192.168.1.15:6379?authPassword=eagle";
		String redisSycUrl = "redis://192.168.1.19:6379?authPassword=123456";
		
		RedisSycThread runableFrom = new RedisSycThread(redisUrl,redisSycUrl);
		RedisSycThread runableTo = new RedisSycThread(redisSycUrl,redisUrl);
		Thread thread = new Thread(runableFrom);
		thread.setName(RedisSycThread.ThreadName.From.getName());
		thread.start();
		
		Thread thread2 = new Thread(runableTo);
		thread2.setName(RedisSycThread.ThreadName.To.getName());
		thread2.start();
	}

}
